#include "../include/head.h"

int ErrCheck_ClientClose(int ret,int netfd,int epfd,pthread_mutex_t* mtx,int* clientInfo)
{
    if(ret==-1)
    {
        pthread_mutex_lock(mtx);
        clientInfo[netfd]=-1;
        pthread_mutex_unlock(mtx);
        epollDel(epfd,netfd);
        close(netfd);
        printf("client %d closed!\n",netfd);
        return 0;
    }
    return 1;
}


